#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from bs4 import BeautifulSoup
import requests

"""
注释说明
"""

__author__ = 'hubert'

import os

# head
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0'
}

proxies = {
#    # "http": "http://218.14.108.53:8060"
#    # "http": "http://39.99.54.91:80"
#    # "http": "http://47.92.113.71:80"
}

encoding = 'uft-8'


def http_request(url):
    req = requests.Session()
    try:
        res = req.get(url, headers=headers, proxies=proxies)
        # 设置编码为utf8
        res.encoding = encoding
        return res
    except Exception as ex_req:
        print("http_request异常", str(ex_req))



if __name__ == '__main__':
    url = "https://www.btnull.re/mv/jYew.html?q=%E8%9C%98%E8%9B%9B%E4%BE%A0"
    res = http_request(url)
    print(res.text)
